import asyncio
import os
import random
from parser import parser
pages_count = 1
import time
async def get_image() -> str:
    global pages_count
    files = os.listdir('photos')

    if len(files) == 1:
        parser.install_imgs(pages_count)
        pages_count += 1
        await asyncio.sleep(10)

    rnd_img = random.choice(files)
    return os.path.join('photos', rnd_img)
    




